home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 12
/
Amiga Plus Sonderheft Amiga 12.iso
/
pd
/
spiele
/
whitelion
/
whitelion.doc
< prev
next >
Wrap
Text File
|
1997-09-15
|
14KB
|
257 lines
-----------------------------------------------------------------------------
---- WhiteLion 1.31 (07. Sept. 1997) ----------------------------------------
-----------------------------------------------------------------------------
---- Program Documentation --------------------------------------------------
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
---- getting started --------------------------------------------------------
-----------------------------------------------------------------------------
To play, just doubleclick on the WhiteLion icon, and on the [?] gadget in the
program window. It should work fine on all Amigas with Kickstart 1.2 or
higher. Try a game and don't be disappointed if you lose. You'll soon get
used to it...
On Hires Laced Screens, you need the Topaz 11 Font.
Just in case you haven't installed it on your HD yet, insert your Workbench
Fonts disk into DF0:, open a Shell and type:
Copy DF0:Fonts/Topaz#? SYS:Fonts ALL
-----------------------------------------------------------------------------
---- for german-only speaking users -------------------------
---- (there might still be some, you never know...) -------------------------
-----------------------------------------------------------------------------
Zum Start klicken Sie bitte zweimal schnell auf das WhiteLion Icon. Setzen
können sie einfach durch Mausklick auf das gewünschte Feld. Die deutsch-
sprachige Version habe ich vorerst nicht fortgesetzt, da es doch eine
Menge Arbeit ist, alles nochmal auf Deutsch zu übersetzen. Wenn genug Inter-
esse besteht, kann ich aber 'Localization', d.h. hier Vielsprachigkeit, zu
einem späteren Zeitpunkt implementieren.
Sie benötigen den Topaz 11 Font, um auf Hires InterLaced Screens zu spielen.
Legen Sie ggf. die Workbench Fonts Diskette in DF0:, starten Sie die Shell
und geben Sie ein:
Copy DF0:Fonts/Topaz#? SYS:Fonts ALL
Wenn Sie wirklich kein Englisch können, try and error :^>>
-----------------------------------------------------------------------------
---- background information -------------------------------------------------
-----------------------------------------------------------------------------
Always being fascinated by artificial intelligence, I started to write this
program in 1991, when I still worked in an old people's home in Hanover.
In Germany you have to fulfil a social civil service if you don't go to the
german army.
My first idea was to use a very quick, move-oriented evaluation of the game
positions to let the program calculate many moves ahead. But the result was
a quite weak, silly playing game which looked four or five moves ahead,
evaluated the resulting positions wrong and tried to reach one of the wrong-
valued new positions.
So I implemented the standard AI alpha-beta pruning algorithm and a position-
oriented evaluation after a while.
In 1992 I found a very useful article by Paul S. Rosenbloom in the Paderborn
University library called 'IAGO - A World Championship Level Othello
Program', published in 'Artificial Intelligence, vol. 19 (1982)'.
This is where I got most of the Minimum Disk Strategy and the Mobility
measurement inspirations from. I then decided to write my own functions for
the border and inner-room evaluation.
The idea of AI games is the following:
Let's assume the computer has to move and there are 12 possible moves in this
position. It executes the possible moves internally, i.e. builds up all 12
new board positions, and saves them. Then it calls an evalutation function
for all saved boards, and the one which gets the highest number is chosen.
If you want the computer to think ahead, let it compute the 12 following
boards ('sons') first, and then for each of the 12 sons compute all following
boards ('grandsons') again. Then evaluate the grandsons, and choose that one
of your sons for play which gives you the best value if the human finds the
best grandson afterwards.
For three moves ahead, compute all grandgrandsons...
This method is called MINIMAX.
In fact, you needn't compute all of them. There is a heuristic search
algorithm called 'alpha-beta pruning' which will give you exactly the same
(MINIMAX) result, but will create less boards:
If the average number of moves per board position is called 'b', and the
search depth 'd', it will only use ca. 2*b^[d/2] instead of b^d moves.
The FD version provides different strategies on the 3 available levels:
Level 1 uses the Max Disk count strategy, adds a border evaluation and
changes the count evaluation as the game proceeds. The search depth is 1.
Level 2 also uses border, count, and in the opening an additional
'inner room' evaluation is used to prevent the opponent from getting to the
border too early. It also (mainly) adds a mobility measure evaluation which
counts the moves you have got, the moves the computer would be able to make
and the moves both of you have. It then returns a number which shows the
mobility difference of the players. The search depth is 2.
Level 3 uses the same evaluation as Level 2, but the search depth is 3
halfmoves ahead now. This should be strong enough already to let you guess at
the strength of the registered version.
See the [?] help window explanations for more.
You'll see that the evaluation function, not the search depth, is essential
for the strength. If the machine looks eight moves ahead, but evaluates the
occuring boards wrong, it will try to get to a wrong position. If it gets
good values near to the real ones, one (halve-)move ahead will be strong
already. If you take a greater search depth then, the game will soon become
unbeatable. But note, in general a computer will never play perfect if it
does not search up to the very end. If you've got only endboards to evaluate,
you've just got to detect who has won. You may then force a win by simply
moving to a position wherefrom all endboards are victories, if it is at all
possible. Currently WhiteLion searches for endgame positions from move
(55-LevelNr/2) on, (56-LevelNr) in the registered version.
If you like the game so far, please consider sending me the Shareware fee.
Then you'll receive the source code with more explanations on the algorithms
and the executable programs. The source is in C and has been compiled with
DICE, a freely distributable C compiler from Fish Disk 491. I also tried Manx
Aztec C 5.0a, but DICE was both faster and created the smaller executable.
Thanks, Matt! (And I'm a registered user now :)
You'll also receive the registered version of WhiteLion 1.3. You'll note the
new Settings menu with various options explained in the program's [?] window.
And WhiteLion now plays a very strong and mysterious strategy, which is
called the Minimum Disk Strategy. The idea is, WhiteLion tries to get as few
disks as possible in the opening game, to reduce the number of moves you may
choose from. You'll find that if you've got less moves, the bad ones are
still there, while the good ones seem to have disappeared. While the game
continues, WhiteLion gets into a strong position and catches all disks back
in the endgame. You'll see! Here the level number is equal to the number of
halvmoves WhiteLion calculates ahead.
The Shareware fee is 10 DM, 7 US$ or 4 british £ in banknotes. I presume it
is not too much if you consider how much time I invested to write the game.
(roughly estimation: at least 1500 hours, wherefrom 1000 hours were used up
by the search and evaluation move programming).
Wrap your bills into a paper sheet to protect them from curious eyes on their
journey, and simply send them in a standard envelope letter, asking for the
registered version of WhiteLion.
As I found out one can get 100 of those goodlooking new 5 DM bills right from
the Bundesbank (with serial numbers from ...00 to ...99) when asking for at
a Sparkasse, I wouldn't ask for you sending them any longer...
I'd be interested in your basic computer model and your Kickstart/Workbench
version. If you've got any suggestions on how to strengthen the evaluation or
want a user interface feature or if you found a bug (i.e. weird behaviour),
I'd be glad to hear from you. But if you don't want to, you needn't write a
whole letter. I promise I'll send back the disk as soon as possible, in
general the next working day. If you've got an EMail address, I can also send
you the game over the wire, packed with lha and uuencoded (please ask if you
wouldn't know how to extract the files). This will usually be even faster and
saves me the expenses for disk and stamps. Just let me know. When I receive
the first letter from Japan, I'll be glad to send back the money. I know that
Othello is very popular there (next to Go, of course...), and I'd especially
like any measurement on WhiteLion's strength from there.
To express my gratefulness, all users who have sent their fee so far get the
registered 1.3 version for free.
I'll keep the right to develop a major new version of Othello even if I get
less then 20 registrations, but it is quite unlikely. I don't want to write
complex programs if noone is interested in them afterwards.
Plans for WhiteLion 2.0 include:
- complete new user interface according to the Style Guide, including Menus,
MenuHelp, 2D/3D board display, OS 2 style cycle and slider gadgets, and
special OS 3 features like 256 colour display and localization. As a result,
this major new version will require OS 2.04 as a minimum platform to run.
I'm definitely not going through this 'have to keep it 1.2 compatible'
problems again. I might consider putting the stronger algorithms described
below into the OS 1.2 version, if there is enough interest. I might also
give away a licence and the necessary sources instead if someone asks.
The new WhiteLion1.3 Settings requester is a typical example how I presume
to design this new version.
- ARexx and Library implementation so you may try out your own strategy by
remixing and weighting the evaluation components. You will be able to
easily simulate the whole search process using the library calls so you'll
need ARexx only to supply the result. This ensures it will still be fast.
- replacement of the a-ß algorithm with the faster SSS*; replacement of SSS*
with SCOUT in the endgame, when the number of possible moves gets lower;
replacement of SCOUT with SOLVE when the computer begins to search to the
very end.
- tournament mode to play against clocks. Implementation of time-dependant
search depth and time usage strategy.
- rewriting of the mobility evaluation. Spreading of the mobility evaluation
over the search tree to save time, i.e. counting the moves while building
up the tree.
- your suggestions. Just tell me.
-----------------------------------------------------------------------------
---- legal stuff ------------------------------------------------------------
-----------------------------------------------------------------------------
In the following context, 'This Program' means the whole WhiteLion1.3 package
as described below. If any part of the following context should be illegal
under a country's law, the whole rest remains valid nevertheless.
This Program is © (c) MXMII, MXMIII by me, Martin Grote, born 25.04.1970.
All Rights Reserved Worldwide.
This Program must not be changed by anyone except written permission by me or
for personal use only.
This Program is Shareware. Only the special FD version may be freely
redistributed. It may be distributed only as the whole package, a directory
containing the following files:
WhiteLion
WhiteLion.info
WhiteLion.doc
WhiteLion.doc.info
README
README.info
The whole package may be packed with a program like 'lha', and be redistri-
buted as such, if no extra charge is applied for this. It must unpack to
This Program then.
I would be glad if Mr. Fred Fish, Amiga Library Disks, would consider placing
This Program on one of his AmigaLibDisks. He may distribute it for whatever
he assumes necessary then.
In no case may anyone else redistribute This Program for more than 5 US$,
five US dollars, without written permission from the author.
In Germany This Program must not be distributed for more than 5 DM; in our
words:
»»»» Dieses Programm darf in Deutschland nicht für mehr als 5 (fünf) DM ««««
»»»» vertrieben werden, falls keine schriftliche Erlaubnis von mir ««««
»»»» vorliegt. ««««
»»»» Dies gilt auch für Warenhausketten! ««««
This Program or any part of it may not be included into a commercial program
package without written permission from the author. Just ask me.
No warranty is given that This Program serves for any special purpose.
Use it on your own risk. No damage is intended, but the author can not be
made reliable for any damage caused by This Program nevertheless.
-----------------------------------------------------------------------------
Nordborchen, 20th of January, 1993. (V1.2)
Nordborchen, 22nd of August, 1993. (V1.3)
Paderborn, 7th of September, 1997. (V1.31)
I HAVE MOVED to Paderborn!
The address shown by the program is no longer valid!
Here's my new address:
-----------------------------------------------------------------------------
Martin Grote
Bernhard-Koethenbuerger-Str. 91
33102 Paderborn
Germany, EC
EMail: chandler@uni-paderborn.de, chandler@c-lab.de
-----------------------------------------------------------------------------
VISIT MY NEW WEBSITE
at www.c-lab.de/~chandler
and take part in the famous WhiteLion user query!